#ifndef __clib_list_h__
#define __clib_list_h__

#include <inttype.h>

#ifdef __cplusplus
extern "C"{
#endif

typedef struct _list list ;

list* lt_create( );
void lt_destroy( list* _lt );
int32 lt_size( list* _lt );

void lt_pushb( list* _lt, void* _val );
void lt_pushf( list *_lt, void *_val );

/// get the value of iterator
void* lt_front( list *_lt );
void* lt_back( list *_lt );

void* lt_popf( list* _lt );
void* lt_popb( list *_lt );

void* lt_get( list *_lt, int _p );
void* lt_update( list *_lt, int _p, void *_val );

int lt_merge( list *_lt1, list *_lt2 );

#ifdef __cplusplus
};
#endif

#endif // __clib_list_h__
